import { createRouter,createWebHistory } from "vue-router";

const routes= [
   {
    name: "Layout",
    path: "/",
    component: () => import("@/components/layout/index.vue"), 
    redirect:"/home",
    children:[
        {
            name: "Home",
            path: "home",
            component: () => import("@/views/Home.vue"),
        },
        {
            name: "Archive",
            path: "archive",
            component: () => import("@/views/archive/index.vue"),
        },
        {
            name: "Talk",
            path: "talk",
            component: () => import("@/views/talk/index.vue"),
        }, 
        {
            name: "Detail",
            path: "detail",
            component: () => import("@/views/detail/index.vue"),
        },
        
        {
            name: "More",
            path: "more",
            children: [
                {
                    name: "About",
                    path: "about",
                    component: () => import("@/views/about/index.vue"),
                },
            ],
            
        },
    ]
   }  
];
const router = createRouter({
    history: createWebHistory(),
    routes
});
export default router;